#ifndef __MESSENGER_H_
#define __MESSENGER_H_

#include <iostream>

#include "ProtectedQ.h"
#include "Message.h"


class Messenger{
private:
    ProtectedQ inbox;

protected:
    ProtectedQ sys_inbox;
    virtual void handleSysMsg(Message* msg)=0;
    virtual void handleRTMsg(Message* msg)=0;
    virtual void handleMsg(Message* msg)=0;

    virtual void popMsg();
public:
    Messenger();
    virtual ~Messenger();
    virtual void insertMsg(Message* msg);
    int get_inbox_size();
    void inbox_clear();
    int get_sys_inbox_size();
    void sys_inbox_clear();
};
#endif
